public class ListNode {
    public int val;
    public ListNode next;

    public ListNode(int val){
        this.val=val;
    }

    public ListNode build(){
        ListNode head=new ListNode(1);
        ListNode cur=head;
        for (int i = 1; i < 5; i++) {
            cur.next=new ListNode(i+1);
            cur=cur.next;
        }
        return head;
    }
}
